#!/bin/env python

import cv2
import numpy as np

pic_path = "../resource/pic/img_003.jpg"
windowName = pic_path

pic1 = cv2.imread(pic_path)
pic1_h, pic1_w, pic1_chn = pic1.shape

# 创建卷积核
kernel = np.ones((5, 5), np.float32) / 25
# 对图片卷积操作
img = cv2.filter2D(pic1, -1, kernel)

cv2.namedWindow(windowName, cv2.WINDOW_NORMAL)
cv2.resizeWindow(windowName, pic1_w * 3 * 2, pic1_h * 3)
cv2.imshow(windowName, np.hstack((pic1, img)))

while True:
    if cv2.waitKey(0) == ord('q'):
        break

print('销毁窗口')
cv2.destroyAllWindows()